package com.anXin.apis.user.fallback;


import com.anXin.apis.user.IUserClient;
import com.anXin.model.common.dtos.ResponseResult;
import com.anXin.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class IUserClientFallback implements IUserClient {


    @Override
    public ResponseResult information(Long id) {
        log.error("获取用户数据触发熔断");
//        throw new RuntimeException();
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR,"获取用户数据失败!当前人数过多请稍后重试");
    }
}
